<!DOCTYPE html>
<html>
  <head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8">
  <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
  <meta name="description" content="along&#39;s blog">
  <meta name="keyword" content="hexo-theme, vuejs">
  
    <link rel="shortcut icon" href="/css/images/logo.png">
  
  <title>
    
      ALONG
    
  </title>
  <link href="/cdn.along/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
  <link href="/cdn.along/nprogress/0.2.0/nprogress.min.css" rel="stylesheet">
  <link href="/cdn.along/highlight.js/9.12.0/styles/tomorrow.min.css" rel="stylesheet">
  
<link rel="stylesheet" href="/css/style.css">

  
  <script src="/cdn.along/jquery/3.2.1/jquery.min.js"></script>
  <script src="/cdn.along/geopattern/1.2.3/js/geopattern.min.js"></script>
  <script src="/cdn.along/nprogress/0.2.0/nprogress.min.js"></script>
  
    
<script src="/js/qrious.js"></script>

  
  
  
  
    <!-- MathJax support START -->
    <script type="text/x-mathjax-config">
      MathJax.Hub.Config({
        tex2jax: {
          inlineMath: [ ['$','$'], ["\\(","\\)"]  ],
          processEscapes: true,
          skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
        }
      });
    </script>

    <script type="text/x-mathjax-config">
      MathJax.Hub.Queue(function() {
        var all = MathJax.Hub.getAllJax(), i;
        for (i=0; i < all.length; i += 1) {
          all[i].SourceElement().parentNode.className += ' has-jax';
        }
      });
    </script>
    <script type="text/javascript" src="/cdn.along/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
    <!-- MathJax support END -->
  


  
  
    
<script src="/js/local-search.js"></script>


<meta name="generator" content="Hexo 5.4.0"></head>
<div class="wechat-share">
  <img src="/css/images/logo.png" />
</div>
  <body>
    <header class="header fixed-header">
  <div class="header-container">
    <a class="home-link" href="/">
      <div class="logo"></div>
      <span>ALONG</span>
    </a>
    <ul class="right-list">
      
        <li class="list-item">
          
            <a href="/" class="item-link active">Home</a>
          
        </li>
      
        <li class="list-item">
          
            <a href="/tags/" class="item-link">Tags</a>
          
        </li>
      
        <li class="list-item">
          
            <a href="/archives/" class="item-link">Archives</a>
          
        </li>
      
        <li class="list-item">
          
            <a href="/about/" class="item-link">About</a>
          
        </li>
      
      
        <li class="menu-item menu-item-search right-list">
    <a role="button" class="popup-trigger">
        <i class="fa fa-search fa-fw"></i>
    </a>
</li>
      
    </ul>
    <div class="menu">
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
    </div>
    <div class="menu-mask">
      <ul class="menu-list">
        
          <li class="menu-item">
            
              <a href="/" class="menu-link mobile-active">Home</a>
            
          </li>
        
          <li class="menu-item">
            
              <a href="/tags/" class="menu-link">Tags</a>
            
          </li>
        
          <li class="menu-item">
            
              <a href="/archives/" class="menu-link">Archives</a>
            
          </li>
        
          <li class="menu-item">
            
              <a href="/about/" class="menu-link">About</a>
            
          </li>
        
      </ul>
    </div>
    
      <div class="search-pop-overlay">
    <div class="popup search-popup">
        <div class="search-header">
            <span class="search-icon">
                <i class="fa fa-search"></i>
            </span>
            <div class="search-input-container">
                <input autocomplete="off" autocapitalize="off"
                    placeholder="Please enter your keyword(s) to search." spellcheck="false"
                    type="search" class="search-input">
            </div>
            <span class="popup-btn-close">
                <i class="fa fa-times-circle"></i>
            </span>
        </div>
        <div id="search-result">
            <div id="no-result">
                <i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>
            </div>
        </div>
    </div>
</div>
    
  </div>
</header>

    <main class="app-body">
  
    <article class="article-card">
      <h2 class="article-head">
        <a href="/2021/12/31/npm%E5%8F%91%E5%B8%83cli/">npm发布cli</a>
      </h2>
      <p class="article-date">2021年12月31日</p>
      
      <div class="article-summary">
        
          编写发布一个简易的cli并发布到npm，类似vue-cli、create-react-app可以快速搭建项目，整体的实现思路就是通过交互命令拉取git上的脚手架
git上传搭建好的项目我发布了两个脚手架地址为    es6    https://github.com/alongithub/a ...
        
      </div>
      <a class="more" href="/2021/12/31/npm%E5%8F%91%E5%B8%83cli/">Read more</a>
    </article>
  
    <article class="article-card">
      <h2 class="article-head">
        <a href="/2021/12/22/jenkins%E5%AE%89%E8%A3%85/">jenkins安装</a>
      </h2>
      <p class="article-date">2021年12月22日</p>
      
      <div class="article-summary">
        
          安装jdkJenkins是java语言开发的，因需要jdk环境
搜索jdk安装包
1yum search java|grep jdk

下载，默认路径 /usr/lib/jvm/
1yum install java

验证
1java -version

jenkins安装按照官网的步骤安装 ...
        
      </div>
      <a class="more" href="/2021/12/22/jenkins%E5%AE%89%E8%A3%85/">Read more</a>
    </article>
  
    <article class="article-card">
      <h2 class="article-head">
        <a href="/2021/12/14/centos%E8%99%9A%E6%8B%9F%E6%9C%BA%E5%AE%89%E8%A3%85/">centos虚拟机安装</a>
      </h2>
      <p class="article-date">2021年12月14日</p>
      
        
  <a href="/tags#centos" >
    <span class="tag-code">centos</span>
  </a>

  <a href="/tags#虚拟机" >
    <span class="tag-code">虚拟机</span>
  </a>

      
      <div class="article-summary">
        
          centos 虚拟机安装下载镜像并创建虚拟机略
centos 安装
打开虚拟机，上下选择键选择 install CentOS

安装完成后会提示选择语言，点继续

之后会发现 begin installation 无法点击，此时选择 installation destination


选择 ...
        
      </div>
      <a class="more" href="/2021/12/14/centos%E8%99%9A%E6%8B%9F%E6%9C%BA%E5%AE%89%E8%A3%85/">Read more</a>
    </article>
  
    <article class="article-card">
      <h2 class="article-head">
        <a href="/2021/12/14/gitlab%E6%90%AD%E5%BB%BA/">gitlab搭建</a>
      </h2>
      <p class="article-date">2021年12月14日</p>
      
        
  <a href="/tags#centos" >
    <span class="tag-code">centos</span>
  </a>

  <a href="/tags#gitlab" >
    <span class="tag-code">gitlab</span>
  </a>

      
      <div class="article-summary">
        
          gitlab代码仓库搭建环境安装
安装ssh
1sudo yum install -y curl policycoreutils-pythonopenssh-server

将SSH服务设置成开机自启动


1sudo systemctl enable sshd


启动SSH服务
1sud ...
        
      </div>
      <a class="more" href="/2021/12/14/gitlab%E6%90%AD%E5%BB%BA/">Read more</a>
    </article>
  
    <article class="article-card">
      <h2 class="article-head">
        <a href="/2021/06/12/vue3-0%E8%AF%AD%E6%B3%95/">vue3语法</a>
      </h2>
      <p class="article-date">2021年6月12日</p>
      
        
  <a href="/tags#vue3.0" >
    <span class="tag-code">vue3.0</span>
  </a>

  <a href="/tags#composition Api" >
    <span class="tag-code">composition Api</span>
  </a>

  <a href="/tags#JSX" >
    <span class="tag-code">JSX</span>
  </a>

      
      <div class="article-summary">
        
          插槽后备内容我们可能希望这个 插槽 内绝大多数情况下都渲染文本“Submit”。为了将“Submit”作为后备内容，我们可以将它放在 slot 标签内：
123&lt;button type=&quot;submit&quot;&gt;  &lt;slot&gt;Submit&lt;/slo ...
        
      </div>
      <a class="more" href="/2021/06/12/vue3-0%E8%AF%AD%E6%B3%95/">Read more</a>
    </article>
  
    <article class="article-card">
      <h2 class="article-head">
        <a href="/2021/01/20/react-%E6%80%A7%E8%83%BD%E4%BC%98%E5%8C%96/">react 性能优化</a>
      </h2>
      <p class="article-date">2021年1月20日</p>
      
        
  <a href="/tags#react" >
    <span class="tag-code">react</span>
  </a>

  <a href="/tags#性能优化" >
    <span class="tag-code">性能优化</span>
  </a>

      
      <div class="article-summary">
        
          React 性能优化核心减少渲染真实DOM的频率,减少Diff比对次数
1. 组件卸载前做清理操作组建中注册的事件计时器等在组件卸载时做清理操作
2. 使用纯组件降低组件重新渲染的频率纯组件指在输入相同的state props 时呈现相同的输出

PureComponent 内部通过对当pr ...
        
      </div>
      <a class="more" href="/2021/01/20/react-%E6%80%A7%E8%83%BD%E4%BC%98%E5%8C%96/">Read more</a>
    </article>
  
    <article class="article-card">
      <h2 class="article-head">
        <a href="/2021/01/20/react-hooks/">react-hooks</a>
      </h2>
      <p class="article-date">2021年1月20日</p>
      
        
  <a href="/tags#hooks" >
    <span class="tag-code">hooks</span>
  </a>

      
      <div class="article-summary">
        
          react hooksuserStateuseState 在使用声明时可以传一个函数，这个函数可以用于动态的给 useState 附初始值，而函数中的代码又只会执行一次。
123456789101112// 通过这种方式也可以动态的附初始值，但是函数组件在每次调用的时候都会计算一次初始值，这 ...
        
      </div>
      <a class="more" href="/2021/01/20/react-hooks/">Read more</a>
    </article>
  
    <article class="article-card">
      <h2 class="article-head">
        <a href="/2021/01/14/mobx/">mobx</a>
      </h2>
      <p class="article-date">2021年1月14日</p>
      
        
  <a href="/tags#mobx" >
    <span class="tag-code">mobx</span>
  </a>

      
      <div class="article-summary">
        
          mobx准备mobx需要项目支持装饰器语法，在create-react-app项目中，进行下面的操作
方式一:
  1. npm run eject
  2. npm install @babel/plugin-proposal-decorators
  3. package.json

  ...
        
      </div>
      <a class="more" href="/2021/01/14/mobx/">Read more</a>
    </article>
  
    <article class="article-card">
      <h2 class="article-head">
        <a href="/2021/01/14/redux/">redux</a>
      </h2>
      <p class="article-date">2021年1月14日</p>
      
        
  <a href="/tags#redux" >
    <span class="tag-code">redux</span>
  </a>

      
      <div class="article-summary">
        
          reduxbindActionCreators更优雅地创建mapDispatchToProps 函数编写好 actionCreator 文件
12345678910111213export const onAdd &#x3D; (num) &#x3D;&gt; &#123;    retur ...
        
      </div>
      <a class="more" href="/2021/01/14/redux/">Read more</a>
    </article>
  
    <article class="article-card">
      <h2 class="article-head">
        <a href="/2021/01/06/%E4%BD%8D%E8%BF%90%E7%AE%97/">位运算</a>
      </h2>
      <p class="article-date">2021年1月6日</p>
      
      <div class="article-summary">
        
          一、位运算二进制：计算机中所有数据的存储和运算都是以二进制（补码）的形式进行的, 数字是四个字节，一个字节为8位，则一个数字是由32位二进制表示的    a -&gt; 97, A -&gt; 65, ‘0’ -&gt; 48举例：5 , -5    原码：    5: 0000 0000  ...
        
      </div>
      <a class="more" href="/2021/01/06/%E4%BD%8D%E8%BF%90%E7%AE%97/">Read more</a>
    </article>
  

  
    <div class="guide-pager">
  
    <a class="unvisible" href="/"><span class="page-arrow">←</span> Prev</a>
  
  
    <a href="/page/2/">Next<span class="page-arrow"> →</span></a>
  
</div>
  
</main>


    <div class="scroll-top">
  <span class="arrow-icon"></span>
</div>
    <footer class="app-footer">
  <p class="copyright">
    Copyright&copy; 2019-2022 along
    <br>
    <a href="https://beian.miit.gov.cn/" target="_blank">京ICP备2020044791号-1</a>
    <!-- <br>
    Theme by <a href="https://github.com/alongithub">alongithub</a>
     -->
  </p>
</footer>

<script>
  function async(u, c) {
    var d = document, t = 'script',
      o = d.createElement(t),
      s = d.getElementsByTagName(t)[0];
    o.src = u;
    if (c) { o.addEventListener('load', function (e) { c(null, e); }, false); }
    s.parentNode.insertBefore(o, s);
  }
</script>
<script>
  async("/cdn.along/fastclick/1.0.6/fastclick.min.js", function(){
    FastClick.attach(document.body);
  })
</script>

<script>
  var hasLine = 'true';
  async("/cdn.along/highlight.js/9.12.0/highlight.min.js", function(){
    $('figure pre').each(function(i, block) {
      var figure = $(this).parents('figure');
      if (hasLine === 'false') {
        figure.find('.gutter').hide();
      }
      hljs.configure({useBR: true});
      var lang = figure.attr('class').split(' ')[1] || 'code';
      var codeHtml = $(this).html();
      var codeTag = document.createElement('code');
      codeTag.className = lang;
      codeTag.innerHTML = codeHtml;
      $(this).attr('class', '').empty().html(codeTag);
      figure.attr('data-lang', lang.toUpperCase());
      hljs.highlightBlock(block);
    });
  })
</script>
<!-- Baidu Tongji -->


<script src="/js/script.js"></script>


  </body>
</html>